from rest_framework.routers import DefaultRouter, SimpleRouter
from apps.goods.views import CategoryModelViewSet
urlpatterns = []
# 1. 创建router实例
router = SimpleRouter()

# 配置路由.
router.register('categories', CategoryModelViewSet, basename='categories')
urlpatterns += router.urls
